home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_08
/
1108113b
< prev
next >
Wrap
Text File
|
1993-06-07
|
316b
|
25 lines
/* swap1.c: A *BOGUS* swap function */
#include <stdio.h>
void swap(int, int);
main()
{
int i = 7, j = 8;
swap(i,j);
printf("i == %d, j == %d\n",i,j);
return 0;
}
void swap(int x, int y)
{
int temp = x;
x = y;
y = temp;
}
/* OUTPUT:
* i == 7, j == 8 */